<template>
  <div class="">
    登录页面
    <button @click="login">登录</button>
  </div>
</template>

<script>
var self;
export default {
  name: "",
  data() {
    return {};
  },
  created() {
    self = this;
  },
  methods: {
    login() {
      localStorage.token="abcdef"
      self.$router.push({ path: "/" });
      self.$message.success("成功登录!");
      //   let params = {};
      //   self.$api
      //     .login(params)
      //     .then(res => {
      //       if (res.code == 200) {
      //         localStorage.token="abcdef"
      //         self.$router.push({ path: "/" });
      //         self.$message.success("成功登录!")
      //       }
      //     })
      //     .catch();
    }
  }
};
</script>
<style scoped lang="scss">
</style>
